package View;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;

/**
 *
 * @author elach_000
 */
public class KeyAction extends AbstractAction {
    
    private String action;
    private BoardView bv;
    
    KeyAction (String action,BoardView bv) {
        this.action = action;
        this.bv = bv;
    }
    
    @Override
    public void actionPerformed(ActionEvent e) {
        bv.getCamera().moveByKeyboard(action);
        bv.repaint();
    }
    
}
